package com.lzm.ydpt.entity.mall;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

public class MallOrderBean implements Parcelable {

    /**
     * order_id : 1
     * store_id : 1
     * price_rmb : 6
     * longitude : 经度
     * latitude : 纬度
     * delivery_method : express
     * payment_platfrom : weixinpay
     * gold : 10
     * dispatch_price : 10
     * deliver_goods_datetime : 1591262772
     * paid_datetime : 1591262772
     * created_datetime : 1591262772
     * completed_datetime : 1591262772
     * order_no : ZH1591262772
     * self_extracting_code : 3-15-46
     * real_name : 姓名
     * mobile : 15723141145
     * address : 收货地址
     * delivery_people : 黄总
     * delivery_people_mobile : 15724786954
     * datetime : 2016-06-20 17:55:00
     * remark : 投递并签收，签收人：单位收发章 *【毕节地区】
     * zone :
     */
    // 提交订单的数据
    private long order_id;//: 1,
    private long parent_order_id;//: 1,
    private long order_refund_id;//"退款订单id

    private int state;//订单状态 1:待付款，2:已取消，3:已关闭，4：待发货（用户付款后），
    // 5：待领取，6：待配送，7：待收货，8：已配送 9:已发货，10：完成
    private long store_id;//: 1,
    private String store_name;//: "智霖的会所",
    private int order_type;//订单类型，1：智慧商城，2：礼品商城，3：安康卫士
    private int refund_state;//退款状态 1:退款中，2:退款完成，3：退款关闭，4：退款失败
    private int refund_flag;//	int	是否可退款 1:可退款，0：不可
    private int refund_type;//	int	退款类型 0:没有退款类型，1:整单退款，2:单商品退款
    private String amount_rmb;//": 6,
    private int goods_amount_gold;//: 6,	商品金额（金币）
    private String goods_amount_rmb;//: 6,商品金额（人民币）
    private int total;//": 2,
    private double longitude;//: "经度",
    private double latitude;//: "纬度",

    private int delivery_method;//配送方式
    private String payment_platfrom;//支付方式   微信 weixinpay  支付宝	alipay 金币	gold 余额	balance
    private int gold;//赠送金币数
    private String dispatch_price;//运费

    private int receipt_flag;//是否收货 1：收货，0：未收货
    private long receipt_datetime;//收货时间

    private long deliver_goods_datetime;//发货时间
    private long paid_datetime;//支付时间
    private long created_datetime;//创建时间
    private long completed_datetime;//完成时间
    private String order_no;//订单号
    private String self_extracting_code;//自取码
    private String real_name;//收货人真实姓名
    private String mobile;//收货人电话
    private String address;//收货地址
    private String delivery_people;//送货人姓名
    private String delivery_people_mobile;//送货人电话
    private String delivery_datetime;//物流事件发生的时间
    private String remark;//物流事件的描述
    private String zone;//快件当时所在区域，由于快递公司升级，现大多数快递不提供此信息

    private ArrayList<ShopGoods> goods = new ArrayList<>();

    protected MallOrderBean(Parcel in) {
        order_id = in.readLong();
        parent_order_id = in.readLong();
        order_refund_id = in.readLong();
        state = in.readInt();
        store_id = in.readLong();
        store_name = in.readString();
        order_type = in.readInt();
        refund_state = in.readInt();
        refund_flag = in.readInt();
        refund_type = in.readInt();
        amount_rmb = in.readString();
        goods_amount_gold = in.readInt();
        goods_amount_rmb = in.readString();
        total = in.readInt();
        longitude = in.readDouble();
        latitude = in.readDouble();
        delivery_method = in.readInt();
        payment_platfrom = in.readString();
        gold = in.readInt();
        dispatch_price = in.readString();
        receipt_flag = in.readInt();
        receipt_datetime = in.readLong();
        deliver_goods_datetime = in.readLong();
        paid_datetime = in.readLong();
        created_datetime = in.readLong();
        completed_datetime = in.readLong();
        order_no = in.readString();
        self_extracting_code = in.readString();
        real_name = in.readString();
        mobile = in.readString();
        address = in.readString();
        delivery_people = in.readString();
        delivery_people_mobile = in.readString();
        delivery_datetime = in.readString();
        remark = in.readString();
        zone = in.readString();
        goods = in.createTypedArrayList(ShopGoods.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(order_id);
        dest.writeLong(parent_order_id);
        dest.writeLong(order_refund_id);
        dest.writeInt(state);
        dest.writeLong(store_id);
        dest.writeString(store_name);
        dest.writeInt(order_type);
        dest.writeInt(refund_state);
        dest.writeInt(refund_flag);
        dest.writeInt(refund_type);
        dest.writeString(amount_rmb);
        dest.writeInt(goods_amount_gold);
        dest.writeString(goods_amount_rmb);
        dest.writeInt(total);
        dest.writeDouble(longitude);
        dest.writeDouble(latitude);
        dest.writeInt(delivery_method);
        dest.writeString(payment_platfrom);
        dest.writeInt(gold);
        dest.writeString(dispatch_price);
        dest.writeInt(receipt_flag);
        dest.writeLong(receipt_datetime);
        dest.writeLong(deliver_goods_datetime);
        dest.writeLong(paid_datetime);
        dest.writeLong(created_datetime);
        dest.writeLong(completed_datetime);
        dest.writeString(order_no);
        dest.writeString(self_extracting_code);
        dest.writeString(real_name);
        dest.writeString(mobile);
        dest.writeString(address);
        dest.writeString(delivery_people);
        dest.writeString(delivery_people_mobile);
        dest.writeString(delivery_datetime);
        dest.writeString(remark);
        dest.writeString(zone);
        dest.writeTypedList(goods);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<MallOrderBean> CREATOR = new Creator<MallOrderBean>() {
        @Override
        public MallOrderBean createFromParcel(Parcel in) {
            return new MallOrderBean(in);
        }

        @Override
        public MallOrderBean[] newArray(int size) {
            return new MallOrderBean[size];
        }
    };

    public int getRefund_type() {
        return refund_type;
    }

    public void setRefund_type(int refund_type) {
        this.refund_type = refund_type;
    }

    public long getOrder_id() {
        return order_id;
    }

    public void setOrder_id(long order_id) {
        this.order_id = order_id;
    }

    public long getParent_order_id() {
        return parent_order_id;
    }

    public void setParent_order_id(long parent_order_id) {
        this.parent_order_id = parent_order_id;
    }

    public long getOrder_refund_id() {
        return order_refund_id;
    }

    public void setOrder_refund_id(long order_refund_id) {
        this.order_refund_id = order_refund_id;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public long getStore_id() {
        return store_id;
    }

    public void setStore_id(long store_id) {
        this.store_id = store_id;
    }

    public String getStore_name() {
        return store_name;
    }

    public void setStore_name(String store_name) {
        this.store_name = store_name;
    }

    public int getOrder_type() {
        return order_type;
    }

    public void setOrder_type(int order_type) {
        this.order_type = order_type;
    }

    public int getRefund_state() {
        return refund_state;
    }

    public void setRefund_state(int refund_state) {
        this.refund_state = refund_state;
    }

    public int getRefund_flag() {
        return refund_flag;
    }

    public void setRefund_flag(int refund_flag) {
        this.refund_flag = refund_flag;
    }

    public String getAmount_rmb() {
        return amount_rmb;
    }

    public void setAmount_rmb(String amount_rmb) {
        this.amount_rmb = amount_rmb;
    }

    public int getGoods_amount_gold() {
        return goods_amount_gold;
    }

    public void setGoods_amount_gold(int goods_amount_gold) {
        this.goods_amount_gold = goods_amount_gold;
    }

    public String getGoods_amount_rmb() {
        return goods_amount_rmb;
    }

    public void setGoods_amount_rmb(String goods_amount_rmb) {
        this.goods_amount_rmb = goods_amount_rmb;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public int getDelivery_method() {
        return delivery_method;
    }

    public void setDelivery_method(int delivery_method) {
        this.delivery_method = delivery_method;
    }

    public String getPayment_platfrom() {
        return payment_platfrom;
    }

    public void setPayment_platfrom(String payment_platfrom) {
        this.payment_platfrom = payment_platfrom;
    }

    public int getGold() {
        return gold;
    }

    public void setGold(int gold) {
        this.gold = gold;
    }

    public String getDispatch_price() {
        return dispatch_price;
    }

    public void setDispatch_price(String dispatch_price) {
        this.dispatch_price = dispatch_price;
    }

    public int getReceipt_flag() {
        return receipt_flag;
    }

    public void setReceipt_flag(int receipt_flag) {
        this.receipt_flag = receipt_flag;
    }

    public long getReceipt_datetime() {
        return receipt_datetime;
    }

    public void setReceipt_datetime(long receipt_datetime) {
        this.receipt_datetime = receipt_datetime;
    }

    public long getDeliver_goods_datetime() {
        return deliver_goods_datetime;
    }

    public void setDeliver_goods_datetime(long deliver_goods_datetime) {
        this.deliver_goods_datetime = deliver_goods_datetime;
    }

    public long getPaid_datetime() {
        return paid_datetime;
    }

    public void setPaid_datetime(long paid_datetime) {
        this.paid_datetime = paid_datetime;
    }

    public long getCreated_datetime() {
        return created_datetime;
    }

    public void setCreated_datetime(long created_datetime) {
        this.created_datetime = created_datetime;
    }

    public long getCompleted_datetime() {
        return completed_datetime;
    }

    public void setCompleted_datetime(long completed_datetime) {
        this.completed_datetime = completed_datetime;
    }

    public String getOrder_no() {
        return order_no;
    }

    public void setOrder_no(String order_no) {
        this.order_no = order_no;
    }

    public String getSelf_extracting_code() {
        return self_extracting_code;
    }

    public void setSelf_extracting_code(String self_extracting_code) {
        this.self_extracting_code = self_extracting_code;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDelivery_people() {
        return delivery_people;
    }

    public void setDelivery_people(String delivery_people) {
        this.delivery_people = delivery_people;
    }

    public String getDelivery_people_mobile() {
        return delivery_people_mobile;
    }

    public void setDelivery_people_mobile(String delivery_people_mobile) {
        this.delivery_people_mobile = delivery_people_mobile;
    }

    public String getDelivery_datetime() {
        return delivery_datetime;
    }

    public void setDelivery_datetime(String delivery_datetime) {
        this.delivery_datetime = delivery_datetime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getZone() {
        return zone;
    }

    public void setZone(String zone) {
        this.zone = zone;
    }

    public ArrayList<ShopGoods> getGoods() {
        return goods;
    }

    public void setGoods(ArrayList<ShopGoods> goods) {
        this.goods = goods;
    }
}